package part1.oo.ooday01;

public class StudentTest {

    public static void main(String[] args) {

        //声明一个Student类型的引用zs指向了一个Student对象
        //数据类型   引用类型变量(引用)   指向      对象
          Student      zs              =     new Student();
          zs.name = "张三";
          zs.age = 25;
          zs.className = "jsd2302";
          zs.stuId = "001";
          zs.study();
          zs.sayHi();
          zs.playWith("李四");

          //创建一个学生对象
          Student  ls =  new Student();
          //访问成员变量
          ls.name = "李四";
          ls.age = 26;
          ls.className = "jsd2302";
          ls.stuId = "002";
          //调用方法
          ls.study();
          ls.sayHi();
          ls.playWith("张三");

          //1) 创建了一个学生对象
          //2) 给所有成员变量赋默认值
          Student ww = new Student();
          ww.study();
          ww.sayHi();
          ww.playWith("张三");
    }
}
